<%@ page import="gdepot.Comment" %>

<div class="fieldcontain ${hasErrors(bean: commentInstance, field: 'rank', 'error')} required">
	<label for="rank">
		<g:message code="comment.rank.label" default="Rank" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="rank" from="${commentInstance.constraints.rank.inList}" required="" value="${fieldValue(bean: commentInstance, field: 'rank')}" valueMessagePrefix="comment.rank"/>

</div>

<div class="fieldcontain ${hasErrors(bean: commentInstance, field: 'createDate', 'error')} required">
	<label for="createDate">
		<g:message code="comment.createDate.label" default="Create Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="createDate" precision="day"  value="${commentInstance?.createDate}"  />

</div>

<div class="fieldcontain ${hasErrors(bean: commentInstance, field: 'goods', 'error')} required">
	<label for="goods">
		<g:message code="comment.goods.label" default="Goods" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="goods" name="goods.id" from="${gdepot.Goods.list()}" optionKey="id" required="" value="${commentInstance?.goods?.id}" class="many-to-one"/>

</div>

<div class="fieldcontain ${hasErrors(bean: commentInstance, field: 'user', 'error')} required">
	<label for="user">
		<g:message code="comment.user.label" default="User" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="user" name="user.id" from="${gdepot.User.list()}" optionKey="id" required="" value="${commentInstance?.user?.id}" class="many-to-one"/>

</div>

<div class="fieldcontain ${hasErrors(bean: commentInstance, field: 'words', 'error')} required">
	<label for="words">
		<g:message code="comment.words.label" default="Words" />
		<span class="required-indicator">*</span>
	</label>
	%{--<ckeditor:config var="toolbar_Mytoolbar">
		[
            [ '-', 'Bold', 'Italic','Smiley','Underline','Strike',,'-','RemoveFormat' , 'Image']
        ]
	</ckeditor:config>
	<ckeditor:editor name="myeditor" toolbar="Mytoolbar"  height="200px" width="50%">
		${initialValue}
	</ckeditor:editor>--}%
	<g:textField name="words" required="" value="${commentInstance?.words}"/>

</div>

